<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<body>
	<c:choose>
		<c:when test="${!empty newsList}">
			<table border="1" align="center" width="500">
				<tr align="center">
					<td>新闻编号</td>
					<td>新闻内容</td>
					<td>发布时间</td>
					<td>浏览人数</td>
					<td colspan="2">操作</td>
				</tr>
		<c:forEach items="${newsList}" var="newslist" varStatus="status">
			<tr align="center">
				<td>${newslist.newsId}</td>
				<td>${newslist.newsContent}</td>
				<td>${newslist.time}</td>
				<td>${newslist.numOfRead}</td>
				<a href="/NewsPublish/InlandNewsServlet?opr=del&delid=${newslist.newsId}">删除</a>
				<a href="upInlandNews.jsp">修改</a>
			</tr>
		</c:forEach>

		<form action="/NewsPublish/InlandNewsServlet?opr=add" method="post">
			<tr align="center">
				<td><input type="text" id="newsid" name="newsid" value="新闻编号"></td>
				<td><input type="text" id="newscont" name="newscont" value="新闻内容"></td>
				<td><input type="text" id="newstime" name="newstime" value="发布时间"></td>
				<td><input type="text" id="newsnor" name="newsnor" value="访问人数"></td>
				<td><input type="submit" value="新增"></td>
			</tr>
		</form>

	</table>
	</c:when>

	<hr>
	<div style="text-align:center;">
		<input type="button" value="返回" onclick="javascript:history.go(-1);">
	</div>
	</c:choose>
</body>


</html>


